package vng.wcc.sonph.Demo;

import vng.wcc.sonph.LauncherGenerator.SimpleGestureFilter;
import vng.wcc.sonph.LauncherGenerator.SimpleGestureListener;
import android.app.Activity;
import android.os.Bundle;
import android.view.MotionEvent;

public abstract class FlipperActivity extends Activity implements SimpleGestureListener{
	
	private SimpleGestureFilter detector;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		detector = new SimpleGestureFilter(this, this);
	}
	
	@Override 
	public boolean dispatchTouchEvent(MotionEvent me){ 
		this.detector.onTouchEvent(me);
		return super.dispatchTouchEvent(me); 
	}
	
	@Override
	public void onDoubleTap() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onSwipe(int direction) {
		switch (direction) {
		case SimpleGestureFilter.SWIPE_LEFT:
			//TODO: on swipe_left
			break;
		case SimpleGestureFilter.SWIPE_RIGHT:
			//TODO: on swipe_right
			break;
		default:
			break;
		}
		
	}
}
